<!--
 * @Description: 浮动布局
 * @Author: rendc
 * @Date: 2025-05-09 09:06:01
 * @LastEditors: rendc
 * @LastEditTime: 2025-05-09 09:36:46
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>浮动布局</title>
</head>
<style>
  /* 清除默认布局 */
  *{
    margin: 0;
    padding: 0;
  }
  div{
    /* 盒子模型改为边框盒子 */
    box-sizing: border-box;
    font-size: 26px;
    color: red;
    font-weight: 700;
    text-align: center;
    font-style: italic;
  }
  .main{
    /* border: 1px solid red; */
    /* 设置页面宽高为视口宽高 */
    width: 100vw;
    /* width: 1800px; */
    height: 100vh;
    /* height: 1200px; */
  }
  .header{
    /* border: 1px solid red; */
    background-color: #F6ACA3;
    width: 100%;
    height: 10%;
  }
  .content{
    /* border: 1px solid red; */
    width: 100%;
    height: 80%;
  }
  .contentLeft,.contentRight{
    /* border: 1px solid black; */
    /* display: inline-block; */
    height: 100%;
  }
  .contentLeft{
    background-color: rgba(217, 255, 47, 0.204);
    width: 30%;
    /* 浮动布局 - 左浮动 */
    float: left;
  }
  .contentRight{
    /* 浮动布局 - 右浮动 */
    float: right;
    width: 70%;
  }
  .up,.down{
    /* border: 1px solid hotpink; */
    height: 50%;
  }
  .up{
    background-color: rgba(135, 207, 235, 0.429);
  }
  .down{
    background-color: #FFDCAF;
  }
  .footer{
    /* border: 1px solid red; */
    background-color: #9FD1CE;
    width: 100%;
    height: 10%;
  }
</style>
<body>
  <div class="main">
    <div class="header">
      <!-- header -->
    </div>
    <div class="content">
      <div class="contentLeft">
        <!-- left -->
      </div>
      <div class="contentRight">
        <!-- right -->
        <div class="up">
          <!-- up -->
        </div>
        <div class="down">
          <!-- down -->
        </div>
      </div>
    </div>
    <div class="footer">
      <!-- footer -->
    </div>
  </div>
</body>
</html>